# !/usr/bin/python3
# -*- coding: utf-8 -*-

"""
日志信息表模型类
----------------------------------------------------
@Project :   xinhou-openai-framework
@File    :   Logs.py
@Contact :   sp_hrz@qq.com

@Modify Time      @Author    @Version    @Desciption
------------      -------    --------    -----------
2023/04/16 22:04  peng.shen   v1.0.0     None
"""

from sqlalchemy import ForeignKey
from sqlalchemy import func

from sqlalchemy import Column, Integer, String, Text, Numeric, TIMESTAMP
from xinhou_openai_framework.core.orm.entity.BaseEntity import BaseEntity


class Logs(BaseEntity):
    # 数据表名&字段
    __tablename__ = 't_logs'

    title = Column(String(512), comment="日志标题")
    type = Column(Integer, comment="日志类型:0=INFO,1=DEBUG,2=ERROR")
    url = Column(String(256), comment="请求地址")
    content = Column(Text, comment="日志内容")
    remark = Column(String(500), comment="备注")
    price = Column(Numeric(10,6), default='0.000000', comment="单价")